# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/25 15:17
# File: craft.py
# IDE: PyCharm
from django.db import models
from utils.common import prefix
from utils.choices import craft_category_choices


class Craft(models.Model):
    id = models.AutoField(db_column='ID', primary_key=True)  # Field name made lowercase.
    craft_category = models.CharField(max_length=20,choices=craft_category_choices)
    title = models.CharField(max_length=10, blank=True, null=True)
    list_pic_url = models.CharField(max_length=10, blank=True, null=True)
    standard = models.CharField(max_length=500, blank=True, null=True)
    check_content = models.TextField()
    notice = models.CharField(max_length=200, blank=True, null=True)
    read_count = models.IntegerField(default=0)
    update_time = models.DateTimeField(blank=True, null=True,auto_now=True)
    is_delete = models.IntegerField(default=0)

    class Meta:
        managed = False
        db_table = prefix+'craft'